home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: willcox@urbana.mcd.mot.com (David A Willcox)
-
- bitbug@netcom.com (James Buster) writes:
-
- >More importantly, the N argument signal handler (where N > 1) and
- >event handlers from 1003.4 destroy any hope of strict ANSI C
- >compatibility. It annoys me that the 1003.4 committee would
- >choose interfaces that require implementation-defined behavior
- >from the compiler/OS and therefore cannot be truly portable.
-
- Read the standard. There is no conflict with either POSIX.1 or ANSI
- C. The 3-argument signal handler is not used with the ANSI signal()
- function; a signal handler established with signal() still gets only
- one argument. You get three arguments only if you establish the
- handler using sigaction(), you set the SA_SIGINFO flag is sa_flags,
- and you use a field other than sa_handler in the sigaction struct.
- (My copy of the last draft isn't handy right now, and I don't remember
- the name of the new field.) The new field has the appropriate
- definition for a 3-arg function.
-
- There is no requirement for "implementation-defined" behavior to make
- this work. It can be done portably.
-
- David A. Willcox "Just say 'NO' to universal drug testing"
- Motorola MCG - Urbana UUCP: ...!uiucuxc!udc!willcox
- 1101 E. University Ave. INET: willcox@urbana.mcd.mot.com
- Urbana, IL 61801 FONE: 217-384-8534
-
- Volume-Number: Volume 31, Number 64
-
-